
<?php 

include('../Connections/KRAPPERCON.php');
//include('../Connections/Accesos.php');

?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="tbl_qmovs">
  <tr>
    <td>
      <input type="button" onClick="showKardexMovs()" value="Consultar">   </td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Referencia:</td>
    <td>
      <input name="t_refkdx" type="text" id="t_refkdx" size="30" />    </td>
  </tr>
  <tr>
    <td>Usuario:</td>
    <td><input name="t_usmov" type="text" id="t_usmov" size="20"></td>
  </tr>
  <tr>
    <td>Fecha de Movimiento :</td>
    <td>
      <input type="text" name="t_kx_fini" class="tcal clsReq"  value="<?php echo $hoy;?>" id="t_kx_fini">
    &nbsp;a&nbsp;
    <input type="text" name="t_kx_ffin"  class="tcal" id="t_kx_ffin">   </td>
  </tr>
  <tr>
    <td>Tipo de Movimiento :</td>
    <td>
      <select name="cbo_kx_clase" id="cbo_kx_clase">
      <option value="">Todos</option>
      <?php 
		$cladoc = 'MG';
		include('../Query_Min/getClaDocs.php');
		?>      
      </select>    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><div id="d_movs"></div></td>
  </tr>
</table>
<script type="text/javascript">
function showKardexMovs(){
if (!$("#tbl_qmovs").checkInput()){
return;
}

$('#d_movs').loadx('Consultas/Opers/queryKardexMovs.php',{
	//t_kx_codart : GEBI('t_kx_codart').value,
	//cbo_kx_alm : GEBI('cbo_kx_alm').value,
	t_kx_fini : GEBI('t_kx_fini').value,
	t_kx_ffin : GEBI('t_kx_ffin').value,
	t_refkdx : GEBI('t_refkdx').value,
	t_user : GEBI('t_usmov').value,
	cbo_kx_clase : GEBI('cbo_kx_clase').value
});
}

function goMov(obj){
	var doc = obj.innerHTML;
	loadPopup(
	{
	url : 'Consultas/Opers/queryKardex.php',
	params : 
		{
		t_kx_codart : '',
		cbo_kx_alm : '',
		t_kx_fini : '',
		t_kx_ffin : '',
		cbo_kx_clase : '',
		movimiento : doc
		}
	}
	);	
}
</script>
